package com.qnvip.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 产品表
 * @TableName product
 */
@TableName(value ="product")
@Data
public class Product {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     *
     */
    private Integer creatorId;

    /**
     * 零件代码
     */
    private String code;

    /**
     * 零件名字
     */
    private String name;

    /**
     * 零件图像
     */
    private String image;

    /**
     *
     */
    private Integer stock;

    /**
     * 最小库存
     */
    private Integer minStock;

    /**
     * 0=不需要 1=需要
     */
    private Integer applyStatus;

    /**
     *
     */
    private Integer categoryId;

//    @Override
//    public boolean equals(Object that) {
//        if (this == that) {
//            return true;
//        }
//        if (that == null) {
//            return false;
//        }
//        if (getClass() != that.getClass()) {
//            return false;
//        }
//        Product other = (Product) that;
//        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
//            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
//            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
//            && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
//            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
//            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
//            && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()))
//            && (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock()))
//            && (this.getMinStock() == null ? other.getMinStock() == null : this.getMinStock().equals(other.getMinStock()))
//            && (this.getApplyStatus() == null ? other.getApplyStatus() == null : this.getApplyStatus().equals(other.getApplyStatus()))
//            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()));
//    }
//
//    @Override
//    public int hashCode() {
//        final int prime = 31;
//        int result = 1;
//        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
//        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
//        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
//        result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
//        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
//        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
//        result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
//        result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode());
//        result = prime * result + ((getMinStock() == null) ? 0 : getMinStock().hashCode());
//        result = prime * result + ((getApplyStatus() == null) ? 0 : getApplyStatus().hashCode());
//        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
//        return result;
//    }
//
//    @Override
//    public String toString() {
//        StringBuilder sb = new StringBuilder();
//        sb.append(getClass().getSimpleName());
//        sb.append(" [");
//        sb.append("Hash = ").append(hashCode());
//        sb.append(", id=").append(id);
//        sb.append(", createTime=").append(createTime);
//        sb.append(", updateTime=").append(updateTime);
//        sb.append(", creatorId=").append(creatorId);
//        sb.append(", code=").append(code);
//        sb.append(", name=").append(name);
//        sb.append(", image=").append(image);
//        sb.append(", stock=").append(stock);
//        sb.append(", minStock=").append(minStock);
//        sb.append(", applyStatus=").append(applyStatus);
//        sb.append(", categoryId=").append(categoryId);
//        sb.append("]");
//        return sb.toString();
//    }
}